gcov: collect more sections to constructor list
authorWei Liu <wei.liu2@citrix.com>
Thu, 1 Sep 2016 12:06:57 +0000 (13:06 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 7 Sep 2016 06:30:03 +0000 (07:30 +0100)
The version of gcc (4.9.2) I use put constructors into .init_array*
section(s). Collect those sections into constructor list as well.

Modify both arm and x86 scripts to keep them in sync.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/arm/xen.lds.S
xen/arch/x86/xen.lds.S

index b24e93b574744bf29305d613ef28f4149818393c..3c5e7ba8275118314d2003d8d1f611a130141f8f 100644 (file)
@@ -166,7 +166,9 @@ SECTIONS
 
        . = ALIGN(8);
        __ctors_start = .;
+       *(.ctors)
        *(.init_array)
+       *(SORT(.init_array.*))
        __ctors_end = .;
   } :text
   __init_end_efi = .;
index 67cfda1ddd19c632a2e8fa27f57dcd87d21611fe..d903c31d9dfee02354bc663472e6b02a3bfcb888 100644 (file)
@@ -205,6 +205,8 @@ SECTIONS
        . = ALIGN(8);
        __ctors_start = .;
        *(.ctors)
+       *(.init_array)
+       *(SORT(.init_array.*))
        __ctors_end = .;
   } :text